package com.atguigu.gmall.order.mapper;


import com.atguigu.gmall.model.dto.order.OrderInfoUpdateStatusDto;
import com.atguigu.gmall.model.order.OrderInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

/**
 * @Entity com.atguigu.gmall.order.domain.OrderInfo1
 */
public interface OrderInfoMapper extends BaseMapper<OrderInfo> {


    void updateOrderStatus(@Param("originStatus") String originStatus,
                           @Param("orderInfo") OrderInfo orderInfo);
    /**
     * @description: 修改订单状态为已支付
     * @author: chensiwei
     * @date: 2024/10/15 2:57
     * @param: [outTradeNo, userId, processStatus, orderStatus]
     * @return: void
     **/
    void updateStatusToPaid(@Param("outTradeNo") String outTradeNo,
                            @Param("userId") Long userId,
                            @Param("processStatus") String processStatus,
                            @Param("orderStatus") String orderStatus);

    OrderInfo getOrderInfoAndDetails(@Param("outTradeNo") String outTradeNo,@Param("userId") Long userId);

    void updateOrderStatusToSpilt(@Param("orderId") Long orderId, @Param("userId") Long userId, @Param("processStatus") String processStatus , @Param("orderStatus") String orderStatus);

    void updateStatusByStock(@Param("orderId") Long orderId, @Param("processStatus") String processStatus, @Param("orderStatus") String orderStatus);
}




